package com.toutou.base.viewmodel

import android.graphics.Color
import androidx.databinding.ObservableBoolean
import androidx.databinding.ObservableField
import androidx.databinding.ObservableInt
import com.toutou.base.R
import com.toutou.base.util.SingleLiveEvent

class ToolBarViewModel : BaseViewModel() {
    var title = ObservableField("")
    var titleColor = ObservableInt(Color.BLACK)
    var titleRightDraResId = ObservableInt(0)
    var rightOneDraResID = ObservableInt(0)
    var rightTwoDraResID = ObservableInt(0)
    var backDraResId = ObservableInt(R.drawable.res_arrow_back)
    var backClickListener : SingleLiveEvent<Any>? = null
    var titleRightClickListener = SingleLiveEvent<Any>()
    val rightOneClickListener = SingleLiveEvent<Any>()
    val rightTwoClickListener = SingleLiveEvent<Any>()
    val isRightOneSelected = ObservableBoolean(false)

    fun backClick()   {
        backClickListener?.call()
    }
    fun titleRightClick()  {
        titleRightClickListener.call()
    }
    fun rightOneClick()  {
        rightOneClickListener.call()
    }
    fun rightTwoClick()  {
        rightTwoClickListener.call()
    }
}